<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"> 


<h:head>
	<title>Prosperous</title>
	<link rel="stylesheet" href="../../../resources/styles/layout.css" type="text/css"/>
	
</h:head>


<h:body>
	<h:form id="form1">
	<div class="wrapper row1">
	  <header id="header" class="clear">
	    <hgroup>
	      <h1><a href="index.html">Cardápio Mobile</a></h1>
	      <h2>Seu cardápio para o mundo todo </h2>
	    </hgroup>
			<fieldset class="fl_right">
		    	<p:panel style="width:300px;height:50px;right:200px;top:60px;background:#696969;border:1px solid black">  
			    	<h:outputLabel style="font-weight:bold;color:#FFFFE0;" value="Usuário:"/>
					<h:outputLabel style="font-weight:bold;color:#FFA500;" value="#{loginMB.getSessao('NomeUsuario')}"/>  
					<fieldset>		
						<h:outputLabel value="Acesso: " style="font-weight:bold;color:#FFFFE0;"/>  
						<h:outputText id="restaurante" style="font-weight:bold;color:#FFA500;" value="#{loginMB.getSessao('NomeFantasia')}"/>
						
						<p:spacer width="75" height="13"/>                                  

						<p:commandButton id="btnNoticia" type="button" icon="ui-iconNews" style="width:25px;height:25px;background:#696969" rendered="#{portalCardapioMB.statusPlanoVencendo}" /> 
						<p:menu overlay="true" trigger="btnNoticia" my="left top" at="left bottom" style="width:300px;height:30px"> 
								<p:menuitem value="#{portalCardapioMB.msgPlanoVencendo}" 
								style="background:#F5F5F5;color: red;font-size:13px;font-weight:bold;" />
						</p:menu>
						
					</fieldset>  
				</p:panel> 
			</fieldset>
			<fieldset>
			<p></p>
			</fieldset>
			
	    <nav class="clear">
	      <ul>

	        <li class="active"><a href="#">Minha Conta</a>
	          <ul>
	            <li><a href="portalCardapioMundo.jsf">Portal Home</a></li>
	            <li><a href="../user/meusDados.jsf">Meus Dados</a></li>
	            <li><a href="portalCardapioMundo.jsf?changeAccess=EEN013550">Trocar Acesso</a></li>
	            <li onclick="PF('dlgSair').show();"><a href="#">Sair</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Acesso</a>
	          <ul>
	            <li><a href="../admin/cadUsuario.jsf">Novo Usuário</a></li>
	            <li><a href="../user/consUsuario.jsf">Consulta Usuários</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>
	        
	        <li><a href="#">Restaurante</a>
	          <ul>
	            <li><a href="../admin/cadRestauranteFilial.jsf?operation=ADDFILIAL">Nova Filial</a></li>
	            <li><a href="../user/consRestaurante.jsf?operation=ALTRESTAURANTE">Consulta Restaurante</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Cardápio</a>
	          <ul>
	            <li><a href="../user/cardapio/opcaoCardapios.jsf">Novo Cardápio</a></li>
	            <li><a href="../user/cardapio/consCardapios.jsf">Cardápios</a></li>
	            <li><a href="../user/cardapio/consCardapios.jsf">Agendamento</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Business Intelligence</a>
	          <ul>
	            <li><a href="#">Avaliações Cardápio</a></li>
	            <li><a href="#">Avaliações Atendimento</a></li>
	            <li><a href="#">Avaliações Infraestrutura</a></li>
	            <li><a href="#">Avaliação Geral</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Plano</a>
	          <ul>
	           <li><a href="../user/meuPlano.jsf">Meu Plano</a></li>
	           <li><a href="../admin/alteraPlano.jsf">Alteração Plano</a></li>
	           <li><a href="../user/planos.jsf">Renovação Conta</a></li>
	          </ul>
	        </li>
	      </ul>
	    </nav>
	  </header>
	</div>
	
	
	<p:dialog id="dialogSair" header="Opção Logout" modal="true" height="85" width="510" widgetVar="dlgSair" resizable="false" 
	showEffect="fade" hideEffect="fade">  
		<h:panelGrid columns="2" cellpadding="5">  
			<h:outputLabel for="username" value="Deseja desconectar do portal Cardápio Mobile ?" style="font-size:15px"/>
		</h:panelGrid>
				          
		<f:facet name="footer">  
			<p class="fl_left">
			<p:commandButton id="cancelarButton" value="Cancelar" height="50" width="50" onclick="PF(dlgSair).hide();"/>
			</p>
			<p class="fl_right">
				<p:commandButton id="sairButton" value="Sair" height="50" width="50" actionListener="#{acessoMB.logout}"/>
			</p>  
		</f:facet>  
    </p:dialog>
  
</h:form>  	    			
	
	
	<h:form id="form2">

	<div class="wrapper row2">
	    <div id="container" class="clear"> 
	    	<div id="homepage">
  					<p:messages id="mensagem" for="mensagem" showDetail="true" autoUpdate="true"/>
  					
  					
  					<!-- ############################ DIALOG ::  NOTIFICACAO STATUS PLANO ############################ -->
  			
  					<p:dialog id="notificacaoStatusPlanoDialog" closable="false" header="Notificação Status Conta" widgetVar="notificacaoStatusConta" resizable="false"  
		                 showEffect="fade" hideEffect="fade" height="200" width="810" modal="true"
		                style="background-color:#F5F5F5; font-size:16px;">

   					    	<h:panelGrid id="gridPlanoAGPagto" columns="2" style="margin-bottom:10px" cellpadding="5" 
   					    	rendered="#{portalCardapioMB.statusPlAgPagamento}" columnClasses="ui-panelgrid">
								<br/>
								<figure><img src="../../../resources/icones/cancel.ico" width="40" height="40" alt=""/>
					            	<h:outputText value="#{msgs.msgHeadPlanoStatusAguardandoPag}" style="color: red;font-size:18px;font-weight:bold;"/>
				          		</figure>
								<br/>
								<f:facet name="footer">	  
				        			<p class="fl_left">
										<p:commandButton  value="#{msgs.cancelar}" icon="ui-icon-check" 
					        			actionListener="#{acessoMB.logout}" onclick="notificacaoStatusConta.hide();">
					        			</p:commandButton>
				        			</p>  
									<p class="fl_right">
										<p:commandButton value="#{msgs.PagamentoPlano}" icon="ui-icon-check" actionListener="#{portalCardapioMB.renovacaoPlanoPortal()}">
					        			</p:commandButton>
									</p>
			    				</f:facet>
			    			</h:panelGrid>
			    			

   					    	<h:panelGrid id="gridPlanoCad" columns="2" style="margin-bottom:10px" cellpadding="5" 
   					    	rendered="#{portalCardapioMB.statusPlCadastrado}" columnClasses="ui-panelgrid">
								<br/>
								<figure><img src="../../../resources/icones/cancel.ico" width="40" height="40" alt=""/>
					            	<h:outputText value="#{msgs.msgHeadPlanoStatusCadastrado}" escape="false" style="color: red;font-size:18px;font-weight:bold;"/>
				          		</figure>
								<br/>
								<f:facet name="footer">	  
				        			<p class="fl_left">
										<p:commandButton  value="#{msgs.cancelar}" icon="ui-icon-check" 
					        			actionListener="#{acessoMB.logout}" onclick="acessoDialog.hide();">
					        			</p:commandButton>
				        			</p>  
									<p class="fl_right">
										<p:commandButton value="#{msgs.ConfirmaPagamento}" icon="ui-icon-check" actionListener="#{portalCardapioMB.renovacaoPlanoPortal()}">
					        			</p:commandButton>
									</p>
			    				</f:facet>
			    			</h:panelGrid>
			    			
			    			<h:panelGrid id="gridPlanoDesativado" columns="2" style="margin-bottom:10px" cellpadding="5" 
   					    	rendered="#{portalCardapioMB.statusPlDesativado}" columnClasses="ui-panelgrid">
								<figure><img src="../../../resources/icones/cancel.ico" width="40" height="40" alt=""/>
					            	<h:outputText value="#{msgs.msgHeadPlanoStatusCancelado}" escape="false" style="color: red;font-size:18px;font-weight:bold;"/>
				          		</figure>
								<br/>
								<f:facet name="footer">	  
				        			<p class="fl_left">
										<p:commandButton  value="#{msgs.cancelar}" icon="ui-icon-check" 
					        			actionListener="#{acessoMB.logout}" onclick="acessoDialog.hide();">
					        			</p:commandButton>
				        			</p>  
									<p class="fl_right">
										<p:commandButton value="#{msgs.AtivcaoConta}" icon="ui-icon-check" actionListener="#{portalCardapioMB.renovacaoPlanoPortal()}">
					        			</p:commandButton>
									</p>
			    				</f:facet>
			    			</h:panelGrid>			    			
	    			</p:dialog>
  					
  					

					<!-- ############################ DIALOG ::  NOTIFICACAO PLANO VENCIDO ############################ -->
  			
  					<p:dialog id="notificacaoDialog" closable="false" header="Renovação de Plano" widgetVar="notificacaoPlanoVencido" resizable="false"  
		                 showEffect="fade" hideEffect="fade" height="210" width="610" modal="true"
		                style="background-color:#F5F5F5; font-size:16px;">

							<br/>
			            	<h:outputText value="#{portalCardapioMB.tituloNome}" escape="false" style="color: red;font-size:20px;font-weight:bold;"/>
							<br/>
							<br/>
			            	<h:outputText value="#{msgs.planoVencido}" escape="false" style="color: red;font-size:18px;font-weight:bold;"/>
							<br/>
							<br/>
							 
							<f:facet name="footer">	  
			        			<p class="fl_left">
									<p:commandButton  value="#{msgs.cancelar}" icon="ui-icon-check" 
				        			actionListener="#{acessoMB.logout}" onclick="acessoDialog.hide();">
				        			</p:commandButton>
			        			</p>  
								<p class="fl_right">
									<p:commandButton value="#{msgs.RenovarPlano}" icon="ui-icon-check" actionListener="#{portalCardapioMB.renovacaoPlanoPortal()}">
				        			</p:commandButton>
								</p>
		    				</f:facet>
	    			</p:dialog>
	    			
				<!-- ############################ DIALOG ::  ESCOLHA EMPRESA PARA ACESSO ############################ -->
  					  	    	
	    			<p:dialog id="dialog" closable="false" header="#{portalCardapioMB.nomeUsuario}" widgetVar="acessoDialog" resizable="false"  
		                 showEffect="fade" hideEffect="fade" height="210" width="610" modal="true"
		                style="background-color:#F5F5F5; font-size:16px;" visible="#{portalCardapioMB.statusDialog}">

							<br/>

			            	<h:outputText value="#{msgs.DialogDefineRest}" escape="false" style="color: blue;font-size:18px;font-weight:bold;"/>
							<br/>
							<br/>
							 
   					    	<h:panelGrid id="grid0" columns="2" style="margin-bottom:10px" cellpadding="5">

							    	<p:selectOneMenu id="acessoRestaurante" effect="fade" value="#{portalCardapioMB.restauranteSelect}" 
							    	panelStyle="width:560px" style="width:560px" required="true">
						            	<f:selectItem itemLabel="Select One" itemValue=""/>
		
								  		<f:selectItem var="sede" itemLabel="#{portalCardapioMB.restSede}"
								  		itemValue="#{portalCardapioMB.restSede}"/>
								
										<f:selectItems value="#{portalCardapioMB.filialAcessoL}" var="filial" itemLabel="#{filial.restauranteFilialJuridicoWeb.nomeFantasiaFilial}" 
											itemValue="#{filial.idRestauranteFilialWeb}"/>  
											            
									</p:selectOneMenu>
							</h:panelGrid>
							
							<f:facet name="footer">	  
			        			<p class="fl_left">
									<p:commandButton  value="#{msgs.cancelar}" icon="ui-icon-check" 
				        			actionListener="#{portalCardapioMB.cancelaOperacaoPortal}" onclick="acessoDialog.hide();">
				        			</p:commandButton>
			        			</p>  
								<p class="fl_right">
									<p:commandButton value="#{msgs.Entrar}" validateClient="true" 
				        			icon="ui-icon-check" actionListener="#{portalCardapioMB.loadInformacoesPortal}">
				        			</p:commandButton>
								</p>
		    				</f:facet>
	    			</p:dialog>
	    			
	    			<!-- ############################################## B O D Y ############################################################# -->

	    			<div align="right">
		    			<p:dataList value="#{portalCardapioMB.qtdeCardapioAtivoPorFilialL}" var="cardapio" type="definition" style="">
	        				<f:facet name="header">
	            				Total Cardápios Ativos
	        				</f:facet>
	        				<f:facet name="description">
	            				<p:graphicImage value="#{cardapio.imgCardapio}" width="50" height="50"/>
	        				</f:facet>
				            <h:outputText value="#{cardapio.qtdeCardapioAtivo}" style="color: red;font-size:12px;font-weight:bold;"/>
	        				<h:outputText value="#{cardapio.nomeCardapio}" style="color: black;font-size:12px;font-weight:bold;"/>
	    				</p:dataList>
	    			</div>
		    	</div>
	    	</div>
    	</div>		
	<!-- Copyright -->
	<div class="wrapper row4">
	  <footer id="copyright" class="clear">
	    <p class="fl_left">Copyright 2014 - All Rights Reserved - <a href="#">W7VM</a></p>
	    <p class="fl_right">W7VM <a href="http://www.w7vm.com/" title="Developer Application Mobile">Developer Application Mobile</a></p>
	  </footer>
	</div>
</h:form>
</h:body>
</html>